import request from '@/utils/request'

export default {
  //字典管理
  getDict() {
    return request({
      url: '/dict/all',
      method: 'get',
    })
  },

  dictList(data) {
    return request({
      url: '/dict/list',
      method: 'post',
      data
    })
  },
  addDict(data) {
    return request({
      url: '/dict',
      method: 'post',
      data
    })
  },
  editDict(data) {
    return request({
      url: '/dict',
      method: 'put',
      data
    })
  },
  delDict(data) {
    return request({
      url: `/dict/${data}`,
      method: 'delete',
      data
    })
  },
  //字典详情
  getDictDetail(dictId) {
    return request({
      url: `/dict_detail/list/${dictId}`,
      method: 'get',
    })
  },
  addDictDetail(data) {
    return request({
      url: '/dict_detail',
      method: 'post',
      data
    })
  },
  editDictDetail(data) {
    return request({
      url: '/dict_detail',
      method: 'put',
      data
    })
  },
  delDictDetail(id) {
    console.log(id);
    return request({
      url: `/dict_detail/${id}`,
      method: 'delete',
    })
  },


}
